export default defineStore("myStore", {
    state: () => ({
        // 定义状态
        counter:0
    }),
    getters: {
        // 定义计算属性
        doubleCounter: (state) => state.counter * 2
    },
    actions: {
        // 定义方法
        increment() {
            this.counter++
        }
    },
    persist: true
})